package com.itheima.a01PolymorphismDemo1;

public class Test {
    public static void main(String[] args) {
        Student student = new Student();
        student.setName("zhangsan");
        student.setAge(18);
        Teacher teacher = new Teacher();
        teacher.setName("tom");
        teacher.setAge(30);
        Administration administration = new Administration();
        administration.setName("jelly");
        administration.setAge(35);

        register(student);
        register(teacher);
        register(administration);
    }

    public static void register(Person person){
        person.show();
    }
}
